home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 16 / IOPROG_16.ISO / soft / macaxsdk / macsdk.hqx / ActiveX DR3 SDK / ActiveX SDK / Sample Controls / TextEdit / CTextEditControl.h / CTextEditControl.h
Encoding:
Text File  |  1997-06-12  |  2.0 KB  |  79 lines  |  [TEXT/CWIE]

  1. // =================================================================================
  2. //
  3. // >>> ⌐ 1996-1997 Microsoft Corporation.  All rights reserved. <<<
  4. //
  5. // =================================================================================
  6.  
  7. #ifndef _H_CTextEditControl
  8. #define _H_CTextEditControl
  9. #pragma once
  10.  
  11. #include "CBaseControl.h"
  12. #include "CBaseCPClient.h"
  13.  
  14. class CTextEditControl;
  15.  
  16. class CTextEditContextInfo :
  17.         public CBaseContextInfo
  18.         
  19. {
  20. public:
  21.     // *** CTextEditContextInfo ***
  22.                 CTextEditContextInfo(CTextEditControl* inControlP, Uint32 ContextID);
  23.     virtual     ~CTextEditContextInfo(void);
  24.  
  25.     // *** CBaseContextInfo methods ***
  26.     virtual AXErrorCode    Update(Boolean8 Acquired);
  27.     virtual AXErrorCode    Activate(Boolean8 Acquired);
  28.     virtual AXErrorCode    Deactivate(Boolean8 Acquired);
  29.  
  30.     // *** CTextEditContextInfo methods ***
  31.     TEHandle            GetTEHandle(void) { return mTextEditH; };
  32.  
  33. private:
  34.     TEHandle            mTextEditH;    
  35. };
  36.  
  37.  
  38. class CTextEditControl :
  39.     public CBaseControl
  40. {
  41. public:
  42. friend class CTextEditContextInfo;
  43.  
  44.     // *** CTextEditControl methods ***
  45.     CTextEditControl(void);
  46.     ~CTextEditControl(void);
  47.     
  48.     // *** IControl methods ***
  49.     STDMETHOD (Draw) (THIS_ AXDrawContext* inContext);
  50.     STDMETHOD (GetID)(THIS_ Int32 inBufferSize, Char8* outID);
  51.     STDMETHOD (DoMouse)(THIS_ AXMouseEventType inMouseET, AXPlatformEvent* inEvent);
  52.     STDMETHOD (DoKey)(THIS_ AXKeyEventType inKeyET, Char8 inChar, AXPlatformEvent* inEvent);
  53.     STDMETHOD (DoIdle)(THIS_ Uint32 IdleRefCon) ;
  54.     STDMETHOD (SetFocus)(THIS_ AXFocusCommand inCommand, AXFocusSet inFocus);
  55.  
  56.     //  *** IPersistPropertyBag methods ***
  57.     STDMETHOD (Load)(THIS_ IPropertyBag* PropBag, IErrorLog* ErrorLog);
  58.  
  59. protected:
  60.     // *** protected methods ***
  61.     virtual CBaseContextInfo*    NewContext(Uint32 inContextID);
  62.     void                TouchAllContexts(void);
  63.  
  64.     // *** protected data members ***
  65.     Str255                mID;
  66.     Handle                mNewText;
  67.     AXFocusSet            mOwnedFoci;
  68.     Int16                mStartSelection;
  69.     Int16                mEndSelection;
  70.     Int16                mFont;
  71.     Int16                mSize;
  72.     Int16                mFace;
  73. #if BE_STRICT
  74.     Boolean8            mMouseWithIn;
  75. #endif    //    BE_STRICT
  76. };
  77.  
  78. #endif
  79.